<?php
	include_once("global.php");
	$str = '测试文字';
	$str = urlencode($str);
	echo $str.'-'.urldecode($str);
	
	$user = $_POST['user'];
	$email = $_POST['email'];
	if($user){
		$sql = "select * from userinfo where U_Loginid = '$user'";
		$query = $mysqli->query($sql);
		$result = $query->fetch_assoc();
		if($result){
			echo "2";
		}else{
			echo "1";
		}
	}
	if($email){
		$sql_check_email = "select * from userinfo where U_email = '$email'";
		$query_check_email = $mysqli->query($sql_check_email);
		$result_check_email = $query_check_email->fetch_assoc();
		if($result_check_email){
			echo "1";
		}else{
			echo "2";
		}
	}

?>